* fix potential memory leaks.
* fix more memory leaks.
A method to find these is to add -DQT_ASCII_CAST_WARNINGS and
then look for xstrdup in the warnings.
* a few cleanups clazy caught.
break;
case 'L':
- waypt_add_url(wpt, xstrdup(cdata), nullptr);
+ waypt_add_url(wpt, cdata, nullptr);
break;
default:
static void
gdb_write_cstr_list(const QString& str)
{
- return gdb_write_cstr_list(CSTRc(str));
+ gdb_write_cstr_list(CSTRc(str));
}
static void
if (html_encrypt && encoded) {
s = rot13(logpart->cdata);
} else {
- s = xstrdup(logpart->cdata);
+ s = logpart->cdata;
}
- QString t = html_entitize(s);
+ char* t = html_entitize(s);
gbfputs(t, file_out);
+ xfree(t);
}
gbfprintf(file_out, "</p>\n");
route_head* route = route_head_alloc();
route->rte_num = routedata[2];
- route->rte_name = xstrdup((char*)routedata + 4);
+ route->rte_name = (char*)routedata + 4;
route_add_head(route);
for (int sr = 0; sr < MAX_SUBROUTES; sr++) {
}
} else {
/* no description available */
- shortname = xstrdup("");
+ shortname = "";
}
} else {
shortname = csv_stringclean(wpt->shortname, BADCHARS);
if (!shortname.isEmpty()) {
description = csv_stringclean(shortname, BADCHARS);
} else {
- description = xstrdup("");
+ description = "";
}
} else {
description = csv_stringclean(wpt->description, BADCHARS);
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+ <title>GPSBabel HTML Output</title>
+ <style>
+ p.gpsbabelwaypoint { font-size: 120%; font-weight: bold }
+ </style>
+</head>
+<body>
+<p class="index">
+<a href="#GCGCA8">GCGCA8 - Oozy rat in a sanitary zoo</a><br>
+</p>
+
+<a name="GCGCA8"><hr></a>
+<table width="100%">
+<tr><td><p class="gpsbabelwaypoint">GCGCA8 - N35°55.300 W86°51.700 (16S 512480 3975269)<br>
+<a href="http://www.geocaching.com/seek/cache_details.aspx?guid=cda94cd6-d657-49bd-8e7e-0031ef1b2613">Oozy rat in a sanitary zoo</a> by robertlipe</p></td>
+<td align="right"><p class="gpsbabelcacheinfo">3 / 2<br>
+Unknown Cache / Unknown</p></td></tr>
+<tr><td colspan="2"><p class="gpsbabeldescshort">The cache is not at the coordinates above. These coords will get you to the correct park and within 1/2 mile of the cache. The cache is within 35 feet of the trail. It is not handicapped accessible. It is a nice walk in the woods that is practical for all ages. There is no space in the container for trading items. You should bring a writing stick and bug spray is recommended.</p>
+<p class="gpsbabeldesclong">So if the cache isn't at the above coordinates, where is it?
+
+<ul>
+
+<li>Too bad I hid a boot
+<li>Too hot to hoot
+<li>Never odd or even
+<li>Do geese see God?
+<li>"Do nine men interpret?" "Nine men," I nod
+<li>Rats live on no evil star
+<li>Go hang a salami, I'm a lasagna hog
+</ul>
+
+Now that it's intuitively obvious to even the most casual observer where the cache is, turn on your geo-mojo and go find it.
+<br>
+<img SRC="http://www.mtgc.org/mtgc_member-banner.gif" WIDTH="500" HEIGHT="40" ALT="Member of Middle Tennessee GeoCachers Club [www.mtgc.org]" BORDER="0"></a></p></p>
+<p class="gpsbabelhint"><strong>Hint:</strong> There Is No Hint</p>
+<p class="gpsbabellog">
+<span class="gpsbabellogtype">Found it</span> by <span class="gpsbabellogfinder">littlepod</span> on <span class="gpsbabellogdate">2005-07-03</span><br>
+Enjoyed the puzzle. We seemed to be about 50ft off though. TFTC.</p>
+<p class="gpsbabellog">
+<span class="gpsbabellogtype">Write note</span> by <span class="gpsbabellogfinder">robertlipe</span> on <span class="gpsbabellogdate">2005-04-29</span><br>
+TB Drop to show he's hanging out in Nashville until we blast off for Geowoodstock in a few weeks.</p>
+<p class="gpsbabellog">
+<span class="gpsbabellogtype">Found it</span> by <span class="gpsbabellogfinder">Big Bumblebee</span> on <span class="gpsbabellogdate">2005-04-18</span><br>
+Found it a while ago. Thanks.</p>
+<p class="gpsbabellog">
+<span class="gpsbabellogtype">Write note</span> by <span class="gpsbabellogfinder">robertlipe</span> on <span class="gpsbabellogdate">2005-03-27</span><br>
+I had to renew my permit with the CDC and in doing so, I trolled out here verified that the infectious ooze is fully within specification and industry accepted tolerance. Ooze On!</p>
+<p class="gpsbabellog">
+<span class="gpsbabellogtype">Found it</span> by <span class="gpsbabellogfinder">Virtual Babe</span> on <span class="gpsbabellogdate">2004-12-27</span><br>
+This was a great cache, however on this day I considered it a FIFM cache (Fun, Invigorating, Frustrating and Maddening), especially when the cache was not replaced in the proper spot by the previous cacher! Thanks anyway!!</p>
+<p class="gpsbabellog">
+<span class="gpsbabellogtype">Write note</span> by <span class="gpsbabellogfinder">robertlipe</span> on <span class="gpsbabellogdate">2004-01-12</span><br>
+I got a complaint from the CDC about oozy rat this weekend. I went out tonight in the dark and verified that the infectious ooze is fully within specification and industry accepted tolerance. (Although I realize now I did misstate the cache container to the reporting officer when confronted. It's, uuuuh, smaller than I said.)</p>
+<p class="gpsbabellog">
+<span class="gpsbabellogtype">Write note</span> by <span class="gpsbabellogfinder">robertlipe</span> on <span class="gpsbabellogdate">2003-10-04</span><br>
+In the expectation that this cache will get some traffic in the next 48 hours, Ryan and I checked it earlier today. The Rat is Oozing just as we planned it.</p>
+<p class="gpsbabellog">
+<span class="gpsbabellogtype">Write note</span> by <span class="gpsbabellogfinder">robertlipe</span> on <span class="gpsbabellogdate">2003-07-03</span><br>
+It won't earn him a smiley face, but I've confirmed that rickrich would have indeed sunk the battleship! Thanx for playing. You get a copy of the home game and some rice-a-roni...</p>
+</td></tr></table>
+</body></html>
\ No newline at end of file
compare ${REFERENCE}/gc/GCGCA8~text.txt ${TMPDIR}/gc.txt
compare ${REFERENCE}/gc/GCGCA8~text-encoded.txt ${TMPDIR}/gc-encoded.txt
compare ${REFERENCE}/gc/GCGCA8~html.txt ${TMPDIR}/gc.html
+
+gpsbabel -i gpx -f ${REFERENCE}/gc/GCGCA8.gpx -o html,logs -F ${TMPDIR}/gc_logs.html
+compare ${REFERENCE}/gc/GCGCA8_logs~html.txt ${TMPDIR}/gc_logs.html
}
} else {
/* no description available */
- shortname = xstrdup("");
+ shortname = "";
}
} else {
shortname = csv_stringclean(wpt->shortname, ",\"");
if (!shortname.isEmpty()) {
description = csv_stringclean(shortname, ",\"");
} else {
- description = xstrdup("");
+ description = "";
}
} else {
description = csv_stringclean(wpt->description, ",\"");
/* obligatory global struct */
/****************************************************************************/
-extern char* xcsv_urlbase;
-extern char* prefer_shortnames;
-
XcsvFile xcsv_file;
static double pathdist = 0;
static double oldlon = 999;
static char* snwhiteopt = nullptr;
static char* snupperopt = nullptr;
static char* snuniqueopt = nullptr;
-char* prefer_shortnames = nullptr;
-char* xcsv_urlbase = nullptr;
+static char* prefer_shortnames = nullptr;
+static char* xcsv_urlbase = nullptr;
static char* opt_datum;
static const char* intstylebuf = nullptr;